/*曲线图*/
var myChart_first = echarts.init(document.getElementById('second-left-echart'));
option = {
	tooltip: {
		trigger: 'axis',
		axisPointer: {
			type: 'cross',
			label: {
				backgroundColor: '#6a7985'
			}
		}
	},
	toolbox: {
		right: '10',
		borderColor: 'red',
		feature: {
			magicType: {
				show: true,
				type: ['line', 'bar']
			},
			restore: {
				show: true
			},
			saveAsImage: {
				show: true
			}
		}
	},
	legend: {
		data: ['邮件营销', '联盟广告'],
		textStyle: {
			color: '#59EAFF' // 图例文字颜色
		}
	},
	grid: {
		top: '45',
		left: '4%',
		right: '4%',
		bottom: '3%',
		containLabel: true
	},
	xAxis: [{
		type: 'category',
		boundaryGap: false,
		data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
		axisLabel: {
			color: "white"
		},
		axisLine: {
			show: false
		},
		axisTick: {
			show: false
		},
	}],
	yAxis: [{
		axisLine: {
			show: false
		},
		axisTick: {
			show: false
		},
		axisLabel: {
			color: "white"
		}
	}],
	series: [{
			name: '邮件营销',
			type: 'line',
			smooth: true,
			color: '#FFFF8B',
			stack: '总量1',
			areaStyle: {
				normal: {}
			},
			data: [12, 432, 101, 200, 90, 230, 480]
		},
		{
			name: '联盟广告',
			type: 'line',
			smooth: true,
			color: '#38F1FF',
			stack: '总量2',
			areaStyle: {
				normal: {}
			},
			data: [100, 182, 191, 150, 290, 330, 120]
		}
	]
};
myChart_first.setOption(option);

/*饼图*/
var myChart = echarts.init(document.getElementById('second-center-echart'));
option = {
	title: {
		text: '设备健康统计',
		x: 'center',
		top: '25',
		textStyle: {
			fontSize: 15,
			fontWeight: 'bolder',
			color: 'white'
		},
	},
	color: ['#ed5843', '#27DDF3', 'yellow'],
	series: [{
		name: '设备健康统计',
		type: 'pie',
		radius: '55%',
		center: ['50%', '60%'],
		data: [{
				value: 335,
				name: '健康设备'
			},
			{
				value: 310,
				name: '二级设备'
			},
			{
				value: 234,
				name: '三级设备'
			}
		],
		itemStyle: {
			emphasis: {
				shadowBlur: 10,
				shadowOffsetX: 0,
				shadowColor: 'rgba(0, 0, 0, 0.5)'
			}
		}
	}]
};
myChart.setOption(option);